<?php

namespace app\backend\service;



use app\backend\model\ZhMatchmakerChargeIntroduce;
use xhadmin\CommonService;

class ZhMatchmakerChargeIntroduceService extends CommonService
{

    /*
     * @Description  列表数据
     */
    public static function indexList($where, $limit, $page)
    {
        try {
            $res = ZhMatchmakerChargeIntroduce::where($where)->paginate(['list_rows' => $limit, 'page' => $page])->toArray();
        } catch (\Exception $e) {
            abort(config('my.error_log_code'), $e->getMessage());
        }
        return ['rows' => $res['data'], 'total' => $res['total']];
    }

    public static function byId($id)
    {
        try {
            $res = ZhMatchmakerChargeIntroduce::where(['id'=>$id])->find();
        } catch (\Exception $e) {
            abort(config('my.error_log_code'), $e->getMessage());
        }
        return $res;
    }



}